package com.example.demo.client.client;

import com.example.demo.client.appname.FeignName;
import com.example.demo.common.vo.ResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author ccubee
 * @since 20-4-19 23:18
 */
@FeignClient(FeignName.PRODUCE_NAME)
@RequestMapping("hello")
public interface HelloClient {

    /**
     *  查询
     * @param name name
     * @return 字符
     */
    @GetMapping("say")
    String say(@RequestParam("name") String name);

    /**
     *  查询
     * @param name name
     * @param token token
     * @return 字符
     */
    @GetMapping("see")
    String see(@RequestParam("name") String name, @RequestHeader("token") String token);

    /**
     *  查询
     * @param name name
     * @return 字符
     */
    @GetMapping("look/{name}")
    String look(@PathVariable("name") String name);


    /**
     * 查询
     * @param code code
     * @return 集合
     */
    @GetMapping("getList")
    ResponseVo<String> getList(@RequestParam Integer code);

    /**
     * 查询
     * @param code code
     * @return 集合
     */
    @GetMapping("getList1")
    String getList1(@RequestParam Integer code);
}
